#include "itemalllists.h"

ItemAllLists::ItemAllLists(QObject *parent) :
    QObject(parent)
{
}

ItemAllLists::ItemAllLists(QString name, QString image, int index, int id)
{
    m_Name = name;
    m_Image = image;
    m_Index = index;
    m_Id=id;
}

ItemAllLists::~ItemAllLists()
{}

QString ItemAllLists::name()
{
    return m_Name;
}

QString ItemAllLists::image()
{
    return m_Image;
}

int ItemAllLists::index()
{
    return m_Index;
}

int ItemAllLists::id(){
    return m_Id;
}

void ItemAllLists::setName(QString name)
{
    if(QString::compare(m_Name, name, Qt::CaseSensitive) != 0)
    {
        m_Name = name;
        emit nameChanged(name);
    }
}

void ItemAllLists::setImage(QString image)
{
    if(QString::compare(m_Image, image, Qt::CaseSensitive) != 0)
    {
        m_Image = image;
        emit imageChanged(image);
    }
}

void ItemAllLists::setIndex(int index)
{
    if(index != m_Index)
    {
        m_Index = index;
        emit indexChanged(index);
    }
}
